Expand description
§alloy-rpc-types
Meta-crate for all Ethereum JSON-RPC types.
Re-exports§
pub use alloy_serde as serde_helpers;
pub use alloy_rpc_types_admin as admin;
admin
pub use alloy_rpc_types_anvil as anvil;
anvil
pub use alloy_rpc_types_beacon as beacon;
beacon
pub use alloy_rpc_types_debug as debug;
debug
pub use alloy_rpc_types_engine as engine;
engine
pub use alloy_rpc_types_eth as eth;
eth
pub use alloy_rpc_types_mev as mev;
mev
pub use alloy_rpc_types_trace as trace;
trace
pub use alloy_rpc_types_txpool as txpool;
txpool
Modules§
- erc4337
eth
This module provides implementations for EIP-4337. - error
eth
Commonly used errors for theeth_
namespace. - pubsub
eth
andserde
Ethereum types for pub-sub - simulate
eth
‘eth_simulateV1’ Request / Response types: https://github.com/ethereum/execution-apis/pull/484 - state
eth
bindings for state overrides in eth_call - transaction
eth
RPC types for transactions
Structs§
- Access
List eth
AccessList as defined in EIP-2930 - A list of addresses and storage keys that the transaction plans to access. Accesses outside the list are possible, but become more expensive.
AccessListResult
for handling errors frometh_createAccessList
- Account
eth
Represents an Account in the account trie. - Account
Info eth
Account information. - Receipt envelope, as defined in EIP-2718.
- An unsigned EIP-7702 authorization.
- This represents a set of blobs, and its corresponding commitments and proofs.
- Block
eth
Block representation - BlockOverrides is a set of header fields to override.
- An iterator over the transaction hashes of a block.
- Bloom
Filter eth
Helper type to represent a bloom filter used for matching logs. - Bundle
eth
Bundle of transactions - Chain
Status eth
Chain status. - EIP1186
Account Proof Response eth
andserde
Response for EIP-1186 account proofeth_getProof
- EIP1186
Storage Proof eth
andserde
Data structure with proof for one single storage-entry - CallResponse for eth_callMany
- Extended account information (used by
parity_allAccountInfo
). - FeeHistory
eth
Response type foreth_feeHistory
- Filter
eth
Filter for logs. - Filter
Set eth
FilterSet is a set of values that will be used to filter logs. - Support for matching Filters
- Header
eth
Block header representation. - Index
eth
A hex encoded or decimal index that’s intended to be used as a rust index, hence it’s deserialized into ausize
. - Log
eth
Ethereum Log emitted by a transaction PackedUserOperation
in the spec: Entry Point V0.7- Parity
eth
Type that represents the signature parity byte, meant for use in RPC. - Peer Ethereum protocol information
- Peer
Info eth
Peer connection information - Peer network information
- Peer protocols information
- Peers
eth
Peers info - Peer PIP protocol information
- RawLog
eth
Ethereum Log - Receipt
eth
Receipt containing result of transaction execution. Receipt
with calculated bloom filter.- account derived from a signature as well as information that tells if it is valid for the current chain
- RpcBlock
Hash eth
A block hash which may have a boolean requireCanonical field. - Represents the
rpc_modules
response, which returns the list of all available modules on that transport and their version - Response to sending a user operation.
- Signature
eth
Container type for all signature fields in RPC - Stage
eth
The detail of the sync stages. - State
Context eth
State context for callMany - Sync
Info eth
Syncing info - Transaction
eth
Transaction object used in RPC - Additional fields in the context of a block that contains this transaction.
- Helper type that supports both
data
andinput
fields that map to transaction input data. - Transaction receipt
- Represents all transaction requests to/from RPC.
- Propagation statistics for pending transaction.
- Internal struct to calculate reward percentiles
UserOperation
in the spec: Entry Point V0.6- Represents the gas estimation for a user operation.
- Represents the receipt of a user operation.
- Withdrawal
eth
Withdrawal represents a validator withdrawal from the consensus layer. - Work
eth
The result of aneth_getWork
request
Enums§
- Block
Error eth
Error that can occur when converting other types to blocks - BlockId
eth
A Block Identifier. https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1898.md - A block Number (or tag - “latest”, “earliest”, “pending”)
- Block Transactions depending on the boolean attribute of
eth_getBlockBy*
, or if used byeth_getUncle*
- Determines how the
transactions
field of block should be filled. - Error variants when converting from crate::Transaction to alloy_consensus::Signed transaction.
- Represents errors that can occur when setting block filters in
FilterBlockOption
. - Represents the target range of blocks for the filter
- Response of the
eth_getFilterChanges
RPC. - Filter
Id eth
Owned equivalent of aSubscriptionId
- Specifies the kind of information you wish to receive from the
eth_newPendingTransactionFilter
RPC endpoint. - Receipt envelope, as defined in EIP-2718.
- Send User Operation
- Sync
Status eth
Sync status - Represents a transaction index where -1 means all transactions
- Value
OrArray eth
Union type for representing a single value or a vector of values inside a filter
Functions§
- Calculates the blob gas price from the header’s excess blob gas field.
- Calculates the
excess_blob_gas
from the parent header’sblob_gas_used
andexcess_blob_gas
. - logs_
bloom eth
Calculate receipt logs bloom.
Type Aliases§
- AnyNetwork
Block eth
andserde
A catch-all block type for handling blocks on multiple networks. - AnyTransaction
Receipt eth
andserde
Alias for a catch-all receipt type. - A block hash or a block number
- Block
NumHash eth
A block number and a hash - Fork
Block eth
Block number and hash of the forked block. - Topic
eth
A single topic